package com.thebitstream.sandy.support;

import org.red5.server.api.IConnection;
import org.red5.server.api.service.IServiceCapableConnection;

/**
 * @author Andy Shaules
 *
 */
public class EventServiceNotifier extends Thread {
	private Object[] _message;

	private IConnection _client;

	private String _sender;

	public EventServiceNotifier(String sender, IConnection client, Object[] message) {
		_sender = sender;
		_client = client;
		_message = message;
	}

	public void run() {
		Object[] message = new Object[] { _sender, _message };
		((IServiceCapableConnection) _client).invoke("onEvent", new Object[] { message });

	}
}
